<?php

/* 
 * Object/Ideal.php
 */
namespace RHX\Model\Object;

class Ideal{
    public $id;
    public $jour;
    public $site;
    public $nb;
    
    /**
     * Constructeur
     * 
     * @param array $data
     */
    public function __construct($data = array()){
	$this->exchangeArray($data);
    }
    
    /**
     * Remplissage
     * 
     * @param array $data
     */
    public function exchangeArray($data){
	$this->id = isset($data['id']) ? $data['id'] : null;
	$this->jour = isset($data['jour']) ? $data['jour'] : '0000-00-00';
	$this->site = isset($data['site']) ? (int)$data['site'] : '-1';
	$this->nb = isset($data['nb']) ? (int)$data['nb'] : 0;
    }
}

